public class TestDemo {

    /*class Solution {
        public ListNode ReverseList(ListNode head) {
            if (head == null) {
                return head;
            }
            ListNode p1 = null;
            ListNode p2 = head;
            ListNode p3 = head.next;
            while (p3 != null) {
                p2.next = p1;
                p1 = p2;
                p2 = p3;
                p3 = p3.next;
            }
            p2.next = p1;
            return p2;
        }

     */

    /*public class Solution {
        /**
         *
         * @param head ListNode类
         * @param m int整型
         * @param n int整型
         * @return ListNode类
         */
        //
        //说明：方便理解，以下注释中将用left，right分别代替m,n节点

        /*public ListNode reverseBetween (ListNode head, int m, int n) {
            //设置虚拟头节点
            ListNode dummyNode = new ListNode(-1);
            dummyNode.next =head;
            ListNode pre = dummyNode;
            for(int i=0;i<m-1;i++){
                pre = pre.next;
            }

            ListNode cur = pre.next;
            ListNode Cur_next ;
            for(int i=0;i<n-m;i++){
                Cur_next = cur.next;
                cur.next = Cur_next.next;
                Cur_next .next = pre.next;
                pre.next = Cur_next ;
            }
            return dummyNode.next;
        }

         */

        /*public class Solution {
            public boolean hasCycle(ListNode head) {
                if (head == null || head.next == null) {
                    return false;
                }
                ListNode slow = head;
                ListNode fast = head;
                while ((slow != null) && (fast != null) && (fast.next != null)) {
                    slow = slow.next;
                    fast = fast.next.next;
                    if (fast == slow) {
                        return true;
                    }
                }
                return false;
            }
        }
         */

        /*
        public class Solution {

    public ListNode EntryNodeOfLoop(ListNode pHead) {
        if (pHead == null || pHead.next == null) {
            return null;
        }
        ListNode slow = pHead;
        ListNode fast = pHead;
        ListNode p1 = pHead;
        while ((fast != null) && (fast.next != null)) {
            slow = slow.next;
            fast = fast.next.next;
            if (slow == fast) {
                break;
            }
        }
        if (fast == null || fast.next == null) {
            return null;
        }
        while (p1 != slow) {
            p1 = p1.next;
            slow = slow.next;
        }
        return p1;
    }
}

        /*
        public class Solution {
        public ListNode removeNthFromEnd (ListNode head, int n) {
            // write code here
            int length = 0;
            ListNode p = head;
            ListNode q = head;
            // 获取链表的长度
            while(head != null){
                length++;
                head = head.next;
            }
            if(length < 2){
                return null;
            }
            // 特殊情况
            if(n == length){
                return q.next;
            }
            int i = 0;
            while(p != null){
                i++;
                if(i == length - n){
                    // 删除结点
                    p.next = p.next.next;
                }
                p = p.next;
            }
            return q;
        }
    }*/
        public static void main(String[] args) {
            System.out.println("This is what I've done today!!!");
        }

}
